//
//  ImageDownloader.h
//  SmartRoadShow
//
//  Created by simon on 10-8-30.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

//用于下载图片的类

@protocol ImageReceiver;

@interface ImageDownloader : NSObject{

	NSInteger tag;
	NSString* imageURLString;
	NSMutableData* imageData;
	NSObject<ImageReceiver>* imageReceiver;
	NSURLConnection *imageConnection;
	
}

@property NSInteger tag;
@property(nonatomic,copy) NSString* imageURLString;
@property(nonatomic,retain) NSObject<ImageReceiver>* imageReceiver;
@property (nonatomic, retain) NSURLConnection *imageConnection;

-(void)startDownloadWithImageURLString:(NSString*)urlString;
-(void)cancelDownload;

@end

@protocol ImageReceiver
-(void)imageDownloader:(ImageDownloader*)downloader didReceiveImage:(UIImage*)image;
@end